var cityObj = [{
  "id": "35",
  "provincecode": "150000",
  "city": "阿拉善盟",
  "code": "152900",
  "initial": "A"
}]

//城市检索的首字母
var searchLetter = ["A", "B", "C", "D", "E", "F", "G", "H", "J", "K", "L", "M", "N", "P", "Q", "R", "S", "T", "W", "X", "Y", "Z"]

function searchLetter() {
  return searchLetter;
}

//对城市信息进行分组
function cityList(e) {
 
  var tempObj = [];
  for (var i = 0; i < searchLetter.length; i++) {
    var initial = searchLetter[i];
    var cityInfo = [];
    var tempArr = {};
    tempArr.initial = initial;
    for (var j = 0; j < e.length; j++) {
      if (initial == e[j].first_char) {
        cityInfo.push(e[j]);
      }
    }
    tempArr.cityInfo = cityInfo;
    tempObj.push(tempArr);
  }
  return tempObj;
}

function pushCity() {

}

module.exports = {
  cityObj: cityObj,
  searchLetter: searchLetter,
  cityList: cityList
}